<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>SQLite 函数</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sqlite.constants.html">预定义常量</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.sqlite-array-query.html">sqlite_array_query</a></div>
 <div class="up"><a href="book.sqlite.html">SQLite</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="ref.sqlite" class="reference">
  <h1 class="title">SQLite 函数</h1>

  <div class="partintro">
   
   <div class="section" id="sqlite.classes">
    <h2 class="title">预定义类</h2>

    <div class="section" id="sqlite.class.sqlitedatabase">
     <h2 class="title"><strong class="classname">SQLiteDatabase</strong></h2>
     <p class="simpara">
      Represents an opened SQLite database.
     </p>
     <div class="section" id="sqlite.class.sqlitedatabase.constructor">
      <h2 class="title">构造函数</h2>
      <ul class="itemizedlist">
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-open.html" class="link">__construct</a> - construct a new SQLiteDatabase object</span>
       </li>
      </ul>
     </div>
     <div class="section" id="sqlite.class.sqlitedatabase.methods">
      <h2 class="title">方法</h2>
      <ul class="itemizedlist">
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-query.html" class="link">query</a> - Execute a query</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-exec.html" class="link">queryExec</a> - Execute a result-less query</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-array-query.html" class="link">arrayQuery</a> - Execute a query and return the result as an array</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-single-query.html" class="link">singleQuery</a> - Execute a query and return either an array for one single column or the value of the first row</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-unbuffered-query.html" class="link">unbufferedQuery</a> - Execute an unbuffered query</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-last-insert-rowid.html" class="link">lastInsertRowid</a> - Returns the rowid of the most recently inserted row</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-changes.html" class="link">changes</a> - Returns the number of rows changed by the most recent statement</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-create-aggregate.html" class="link">createAggregate</a> - Register an aggregating UDF for use in SQL statements</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-create-function.html" class="link">createFunction</a> - Register a UDF for use in SQL statements</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-busy-timeout.html" class="link">busyTimeout</a> - Sets or disables busy timeout duration</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-last-error.html" class="link">lastError</a> - Returns the last error code of the most recently encountered error</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-column-types.html" class="link">fetchColumnTypes</a> - Return an array of column types from a particular table</span>
       </li>
      </ul>
     </div>
    </div>

    <div class="section" id="sqlite.class.sqliteresult">
     <h2 class="title"><strong class="classname">SQLiteResult</strong></h2>
     <p class="simpara">
      Represents a buffered SQLite result set.
     </p>
     <div class="section" id="sqlite.class.sqliteresult.methods">
      <h2 class="title">方法</h2>
      <ul class="itemizedlist">
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-array.html" class="link">fetch</a> - Fetches the next row from the result set as an array</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-object.html" class="link">fetchObject</a> - Fetches the next row from the result set as an object</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-single.html" class="link">fetchSingle</a> - Fetches the first column from the result set as a string</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-all.html" class="link">fetchAll</a> - Fetches all rows from the result set as an array of arrays</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-column.html" class="link">column</a> - Fetches a column from the current row of the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-num-fields.html" class="link">numFields</a> - Returns the number of fields in the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-field-name.html" class="link">fieldName</a> - Returns the name of a particular field in the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-current.html" class="link">current</a> - Fetches the current row from the result set as an array</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-key.html" class="link">key</a> - Return the current row index</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-next.html" class="link">next</a> - Seek to the next row number</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-valid.html" class="link">valid</a> - Returns whether more rows are available</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-rewind.html" class="link">rewind</a> - Seek to the first row number of the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-prev.html" class="link">prev</a> - Seek to the previous row number of the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-has-prev.html" class="link">hasPrev</a> - Returns whether or not a previous row is available</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-num-rows.html" class="link">numRows</a> - Returns the number of rows in the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-seek.html" class="link">seek</a> - Seek to a particular row number</span>
       </li>
      </ul>
     </div>
    </div>

    <div class="section" id="sqlite.class.sqliteunbuffered">
     <h2 class="title"><strong class="classname">SQLiteUnbuffered</strong></h2>
     <p class="simpara">
      Represents an unbuffered SQLite result set.  Unbuffered results sets are sequential, forward-seeking only.
     </p>
     <div class="section" id="sqlite.class.sqliteunbuffered.methods">
      <h2 class="title">方法</h2>
      <ul class="itemizedlist">
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-array.html" class="link">fetch</a> - Fetches the next row from the result set as an array</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-object.html" class="link">fetchObject</a> - Fetches the next row from the result set as an object</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-single.html" class="link">fetchSingle</a> - Fetches the first column from the result set as a string</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-fetch-all.html" class="link">fetchAll</a> - Fetches all rows from the result set as an array of arrays</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-column.html" class="link">column</a> - Fetches a column from the current row of the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-num-fields.html" class="link">numFields</a> - Returns the number of fields in the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-field-name.html" class="link">fieldName</a> - Returns the name of a particular field in the result set</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-current.html" class="link">current</a> - Fetches the current row from the result set as an array</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-next.html" class="link">next</a> - Seek to the next row number</span>
       </li>
       <li class="listitem">
        <span class="simpara"><a href="function.sqlite-valid.html" class="link">valid</a> - Returns whether more rows are available</span>
       </li>
      </ul>
     </div>
    </div>

   </div>

  </div>

  














































































































































































































































 <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="function.sqlite-array-query.html">sqlite_array_query</a> — Execute a query against a given database and returns an array</li><li><a href="function.sqlite-busy-timeout.html">sqlite_busy_timeout</a> — Set busy timeout duration, or disable busy handlers</li><li><a href="function.sqlite-changes.html">sqlite_changes</a> — Returns the number of rows that were changed by the most
   recent SQL statement</li><li><a href="function.sqlite-close.html">sqlite_close</a> — Closes an open SQLite database</li><li><a href="function.sqlite-column.html">sqlite_column</a> — Fetches a column from the current row of a result set</li><li><a href="function.sqlite-create-aggregate.html">sqlite_create_aggregate</a> — Register an aggregating UDF for use in SQL statements</li><li><a href="function.sqlite-create-function.html">sqlite_create_function</a> — Registers a &quot;regular&quot; User Defined Function for use in SQL statements</li><li><a href="function.sqlite-current.html">sqlite_current</a> — Fetches the current row from a result set as an array</li><li><a href="function.sqlite-error-string.html">sqlite_error_string</a> — Returns the textual description of an error code</li><li><a href="function.sqlite-escape-string.html">sqlite_escape_string</a> — Escapes a string for use as a query parameter</li><li><a href="function.sqlite-exec.html">sqlite_exec</a> — Executes a result-less query against a given database</li><li><a href="function.sqlite-factory.html">sqlite_factory</a> — Opens an SQLite database and returns an SQLiteDatabase object</li><li><a href="function.sqlite-fetch-all.html">sqlite_fetch_all</a> — Fetches all rows from a result set as an array of arrays</li><li><a href="function.sqlite-fetch-array.html">sqlite_fetch_array</a> — Fetches the next row from a result set as an array</li><li><a href="function.sqlite-fetch-column-types.html">sqlite_fetch_column_types</a> — Return an array of column types from a particular table</li><li><a href="function.sqlite-fetch-object.html">sqlite_fetch_object</a> — Fetches the next row from a result set as an object</li><li><a href="function.sqlite-fetch-single.html">sqlite_fetch_single</a> — Fetches the first column of a result set as a string</li><li><a href="function.sqlite-fetch-string.html">sqlite_fetch_string</a> — 别名 sqlite_fetch_single</li><li><a href="function.sqlite-field-name.html">sqlite_field_name</a> — Returns the name of a particular field</li><li><a href="function.sqlite-has-more.html">sqlite_has_more</a> — Finds whether or not more rows are available</li><li><a href="function.sqlite-has-prev.html">sqlite_has_prev</a> — Returns whether or not a previous row is available</li><li><a href="function.sqlite-key.html">sqlite_key</a> — Returns the current row index</li><li><a href="function.sqlite-last-error.html">sqlite_last_error</a> — Returns the error code of the last error for a database</li><li><a href="function.sqlite-last-insert-rowid.html">sqlite_last_insert_rowid</a> — Returns the rowid of the most recently inserted row</li><li><a href="function.sqlite-libencoding.html">sqlite_libencoding</a> — Returns the encoding of the linked SQLite library</li><li><a href="function.sqlite-libversion.html">sqlite_libversion</a> — Returns the version of the linked SQLite library</li><li><a href="function.sqlite-next.html">sqlite_next</a> — Seek to the next row number</li><li><a href="function.sqlite-num-fields.html">sqlite_num_fields</a> — Returns the number of fields in a result set</li><li><a href="function.sqlite-num-rows.html">sqlite_num_rows</a> — Returns the number of rows in a buffered result set</li><li><a href="function.sqlite-open.html">sqlite_open</a> — Opens an SQLite database and create the database if it does not exist</li><li><a href="function.sqlite-popen.html">sqlite_popen</a> — Opens a persistent handle to an SQLite database and create the database if it does not exist</li><li><a href="function.sqlite-prev.html">sqlite_prev</a> — Seek to the previous row number of a result set</li><li><a href="function.sqlite-query.html">sqlite_query</a> — Executes a query against a given database and returns a result handle</li><li><a href="function.sqlite-rewind.html">sqlite_rewind</a> — Seek to the first row number</li><li><a href="function.sqlite-seek.html">sqlite_seek</a> — Seek to a particular row number of a buffered result set</li><li><a href="function.sqlite-single-query.html">sqlite_single_query</a> — Executes a query and returns either an array for one single column or the value of the first row</li><li><a href="function.sqlite-udf-decode-binary.html">sqlite_udf_decode_binary</a> — Decode binary data passed as parameters to an UDF</li><li><a href="function.sqlite-udf-encode-binary.html">sqlite_udf_encode_binary</a> — Encode binary data before returning it from an UDF</li><li><a href="function.sqlite-unbuffered-query.html">sqlite_unbuffered_query</a> — Execute a query that does not prefetch and buffer all data</li><li><a href="function.sqlite-valid.html">sqlite_valid</a> — Returns whether more rows are available</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sqlite.constants.html">预定义常量</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.sqlite-array-query.html">sqlite_array_query</a></div>
 <div class="up"><a href="book.sqlite.html">SQLite</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
